﻿/*-----------------------------------------------
// File: EquipOrTreaFragIconTemplate.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;

namespace UI
{
    public class EquipOrTreaFragIconTemplate : EquipOrTreaIconTemplate
    {
        public UILabel numLabel;
        public void SetEquipOrTreaFrag(TextureIcon iconType, string id, int num) {
            var df = Dict.Blo.DictFragBlo.GetTableFrag(id);
            if (iconType == TextureIcon.EQUIP)
            {
                var de = Dict.Blo.DictEquipBlo.GetTableEquip(df.target);
                SetIcon(iconType, de.icon);
            }
            else {
                var dt = Dict.Blo.DictTreasureBlo.GetTableTreasure(df.target);
                SetIcon(iconType, dt.icon);
            }
            numLabel.text = num.ToString(); 
        }

    }
}
